---
layout: m1x_soap
title: Customer Info
---

<h3><a name="giftcard_customer.info-Module%3AGiftCardAPI"></a>Module: GiftCard API</h3>

<h4><a name="giftcard_customer.info-Resource%3Agiftcardcustomer"></a>Resource: giftcard_customer</h4>


<h5><a name="giftcard_customer.info-Method%3A"></a>Method:</h5>

<ul>
	<li>giftcard_customer.info (SOAP V1)</li>
	<li>giftcardCustomerInfo (SOAP V2)</li>
</ul>


<p>Allows you to receive information about the gift card for a selected customer.</p>

<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId </td>
<td> Session ID </td>
</tr>
<tr>
<td> string </td>
<td> code </td>
<td> Gift card code </td>
</tr>
</tbody></table>


<p><b>Return:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> array </td>
<td> result </td>
<td> Array of giftcardCustomerEntity </td>
</tr>
</tbody></table>


<p>The <b>giftcardCustomerEntity</b> content is as follows:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> double </td>
<td> balance <br class="atl-forced-newline" /> </td>
<td> Gift card balance </td>
</tr>
<tr>
<td> string </td>
<td> expire_date <br class="atl-forced-newline" /> </td>
<td> Gift card expiration date in the YYYY-MM-DD format </td>
</tr>
</tbody></table>


<p><b>Faults:</b></p>


<table><tbody>
<tr>
<th> Fault Code </th>
<th> Fault Message </th>
</tr>
<tr>
<td> 100 </td>
<td> Gift card does not exists. </td>
</tr>
<tr>
<td> 101 </td>
<td> Gift card is not valid. </td>
</tr>
</tbody></table>


<h4><a name="giftcard_customer.info-Examples"></a>Examples</h4>

<h5><a name="giftcard_customer.info-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

$code = "code";

$giftcardInfo = $proxy-&gt;call(
    $sessionId,
    "giftcard_customer.info",
    array(
         $code
    )
);</pre>
		</div>
</div></div>

<h5><a name="giftcard_customer.info-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy-&gt;giftcardCustomerInfo($sessionId, 'code');
var_dump($result);</pre>
		</div>
</div></div>



<h5><a name="giftcard_customer.info-RequestExampleSOAPV2%28WSIComplianceMode%29"></a>Request Example SOAP V2 (WS-I Compliance Mode)</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');

$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey'));

$result = $proxy-&gt;giftcardCustomerInfo((object)array('sessionId' =&gt; $sessionId-&gt;result, 'code' =&gt; 'code'));

var_dump($result-&gt;result);</pre>
		</div>
</div></div>

<h5><a name="giftcard_customer.info-ResponseExampleSOAPV1"></a>Response Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">array
  'balance' =&gt; string '500.0000' (length=8)
  'expire_date' =&gt; string '2012-04-25' (length=10)</pre>
		</div>
</div></div>


